<!-- saved from url=(0014)about:internet -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>EComm.mxml</title>
<link rel="stylesheet" type="text/css" href="../SourceStyles.css"/>
</head>

<body><pre><span class="MXMLProcessing_Instruction">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;</span>
<span class="MXMLComponent_Tag">&lt;mx:Application</span><span class="MXMLDefault_Text"> xmlns:mx=&quot;</span><span class="MXMLString">http://www.adobe.com/2006/mxml</span><span class="MXMLDefault_Text">&quot; layout=&quot;</span><span class="MXMLString">absolute</span><span class="MXMLDefault_Text">&quot; creationComplete=&quot;</span><span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">groceryInventory</span><span class="ActionScriptBracket/Brace">)</span><span class="MXMLDefault_Text">&quot; viewSourceURL=&quot;</span><span class="MXMLString">srcview/index.html</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
<span class="MXMLSpecial_Tag">&lt;mx:Script&gt;</span>
    <span class="ActionScriptOperator">&lt;!</span><span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptDefault_Text">CDATA</span><span class="ActionScriptBracket/Brace">[</span>
        <span class="ActionScriptBracket/Brace">[</span><span class="ActionScriptMetadata">Bindable</span><span class="ActionScriptBracket/Brace">]</span>
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptvar">var</span> <span class="ActionScriptDefault_Text">prod</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Product</span>; 
        <span class="ActionScriptReserved">public</span> <span class="ActionScriptfunction">function</span> <span class="ActionScriptDefault_Text">init</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">o</span><span class="ActionScriptOperator">:</span><span class="ActionScriptDefault_Text">Object</span><span class="ActionScriptBracket/Brace">)</span><span class="ActionScriptOperator">:</span><span class="ActionScriptReserved">void</span><span class="ActionScriptBracket/Brace">{</span>
            <span class="ActionScriptDefault_Text">prod</span><span class="ActionScriptOperator">=</span> <span class="ActionScriptDefault_Text">Product</span>.<span class="ActionScriptDefault_Text">create</span><span class="ActionScriptBracket/Brace">(</span><span class="ActionScriptDefault_Text">o</span><span class="ActionScriptBracket/Brace">)</span>;
            <span class="ActionScriptReserved">return</span> ;
        <span class="ActionScriptBracket/Brace">}</span>
    <span class="ActionScriptBracket/Brace">]]</span><span class="ActionScriptOperator">&gt;</span>
<span class="MXMLSpecial_Tag">&lt;/mx:Script&gt;</span>
    <span class="MXMLSpecial_Tag">&lt;mx:Model</span><span class="MXMLDefault_Text"> id=&quot;</span><span class="MXMLString">groceryInventory</span><span class="MXMLDefault_Text">&quot; source=&quot;</span><span class="MXMLString">data.xml</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLSpecial_Tag">&gt;</span><span class="MXMLDefault_Text">
    </span><span class="MXMLSpecial_Tag">&lt;/mx:Model&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:states&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:State</span><span class="MXMLDefault_Text"> name=&quot;</span><span class="MXMLString">cartView</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:SetProperty</span><span class="MXMLDefault_Text"> target=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">products</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; name=&quot;</span><span class="MXMLString">width</span><span class="MXMLDefault_Text">&quot; value=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:SetProperty</span><span class="MXMLDefault_Text"> target=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">products</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; name=&quot;</span><span class="MXMLString">height</span><span class="MXMLDefault_Text">&quot; value=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:SetProperty</span><span class="MXMLDefault_Text"> target=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">cartBox</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; name=&quot;</span><span class="MXMLString">width</span><span class="MXMLDefault_Text">&quot; value=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:AddChild</span><span class="MXMLDefault_Text"> relativeTo=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">cartBox</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; position=&quot;</span><span class="MXMLString">lastChild</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
                <span class="MXMLComponent_Tag">&lt;mx:DataGrid</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">dgCart</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
                    <span class="MXMLComponent_Tag">&lt;mx:columns&gt;</span>
                        <span class="MXMLComponent_Tag">&lt;mx:DataGridColumn</span><span class="MXMLDefault_Text"> headerText=&quot;</span><span class="MXMLString">Column 1</span><span class="MXMLDefault_Text">&quot; dataField=&quot;</span><span class="MXMLString">col1</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                        <span class="MXMLComponent_Tag">&lt;mx:DataGridColumn</span><span class="MXMLDefault_Text"> headerText=&quot;</span><span class="MXMLString">Column 2</span><span class="MXMLDefault_Text">&quot; dataField=&quot;</span><span class="MXMLString">col2</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                        <span class="MXMLComponent_Tag">&lt;mx:DataGridColumn</span><span class="MXMLDefault_Text"> headerText=&quot;</span><span class="MXMLString">Column 3</span><span class="MXMLDefault_Text">&quot; dataField=&quot;</span><span class="MXMLString">col3</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                    <span class="MXMLComponent_Tag">&lt;/mx:columns&gt;</span>
                <span class="MXMLComponent_Tag">&lt;/mx:DataGrid&gt;</span>
            <span class="MXMLComponent_Tag">&lt;/mx:AddChild&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:SetEventHandler</span><span class="MXMLDefault_Text"> target=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">bntViewCart</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; name=&quot;</span><span class="MXMLString">click</span><span class="MXMLDefault_Text">&quot; handler=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;&apos;</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:AddChild</span><span class="MXMLDefault_Text"> relativeTo=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">cartBox</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; position=&quot;</span><span class="MXMLString">lastChild</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
                <span class="MXMLComponent_Tag">&lt;mx:LinkButton</span><span class="MXMLDefault_Text"> label=&quot;</span><span class="MXMLString">Continue Shopping</span><span class="MXMLDefault_Text">&quot; click=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;&apos;</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;/mx:AddChild&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:RemoveChild</span><span class="MXMLDefault_Text"> target=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">linkbutton1</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            
        <span class="MXMLComponent_Tag">&lt;/mx:State&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:State</span><span class="MXMLDefault_Text"> name=&quot;</span><span class="MXMLString">expanded</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:AddChild&gt;</span>
                <span class="MXMLComponent_Tag">&lt;mx:VBox</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">200</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
                    <span class="MXMLComponent_Tag">&lt;mx:Text</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">groceryInventory</span>.<span class="ActionScriptDefault_Text">description</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                    <span class="MXMLComponent_Tag">&lt;mx:Text</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">Certified Orgnic</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">50%</span><span class="MXMLDefault_Text">&quot; visible=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">prod</span>.<span class="ActionScriptDefault_Text">isOrganic</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                    <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">Low fat</span><span class="MXMLDefault_Text">&quot; visible=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">prod</span>.<span class="ActionScriptDefault_Text">isLowFat</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
                    
                <span class="MXMLComponent_Tag">&lt;/mx:VBox&gt;</span>
            <span class="MXMLComponent_Tag">&lt;/mx:AddChild&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:State&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/mx:states&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:ApplicationControlBar</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; dock=&quot;</span><span class="MXMLString">true</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">90</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:Canvas</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; text=&quot;</span><span class="MXMLString">Flex</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">51</span><span class="MXMLDefault_Text">&quot; text=&quot;</span><span class="MXMLString">GROCER</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> y=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; label=&quot;</span><span class="MXMLString">View Cart</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">bntViewCart</span><span class="MXMLDefault_Text">&quot; right=&quot;</span><span class="MXMLString">90</span><span class="MXMLDefault_Text">&quot; click=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;cartView&apos;</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> y=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; label=&quot;</span><span class="MXMLString">Checkout</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">bntCheckout</span><span class="MXMLDefault_Text">&quot; right=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:Canvas&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/mx:ApplicationControlBar&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">(c) 2009, FlexGrocer</span><span class="MXMLDefault_Text">&quot; right=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot; bottom=&quot;</span><span class="MXMLString">10</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
    <span class="MXMLComponent_Tag">&lt;mx:HBox</span><span class="MXMLDefault_Text"> x=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; y=&quot;</span><span class="MXMLString">0</span><span class="MXMLDefault_Text">&quot; width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">bodyBox</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:VBox</span><span class="MXMLDefault_Text"> width=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">products</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">prod</span>.<span class="ActionScriptDefault_Text">prodName</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">prodName</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Image</span><span class="MXMLDefault_Text"> source=&quot;</span><span class="MXMLString">@Embed(&apos;g.gif&apos;)</span><span class="MXMLDefault_Text">&quot; scaleContent=&quot;</span><span class="MXMLString">false</span><span class="MXMLDefault_Text">&quot;
                mouseOver=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;expanded&apos;</span><span class="MXMLDefault_Text">&quot;
                mouseOut=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;&apos;</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">{</span><span class="ActionScriptDefault_Text">prod</span>.<span class="ActionScriptDefault_Text">listPrice</span><span class="MXMLString">}</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">price</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Button</span><span class="MXMLDefault_Text"> label=&quot;</span><span class="MXMLString">Add to Cart</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">add</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
        <span class="MXMLComponent_Tag">&lt;/mx:VBox&gt;</span>
        <span class="MXMLComponent_Tag">&lt;mx:VBox</span><span class="MXMLDefault_Text"> height=&quot;</span><span class="MXMLString">100%</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">cartBox</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:Label</span><span class="MXMLDefault_Text"> text=&quot;</span><span class="MXMLString">Your Cart Total:$</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            <span class="MXMLComponent_Tag">&lt;mx:LinkButton</span><span class="MXMLDefault_Text"> label=&quot;</span><span class="MXMLString">Veiw Cart</span><span class="MXMLDefault_Text">&quot; id=&quot;</span><span class="MXMLString">linkbutton1</span><span class="MXMLDefault_Text">&quot; click=&quot;</span><span class="ActionScriptReserved">this</span>.<span class="ActionScriptDefault_Text">currentState</span><span class="ActionScriptOperator">=</span><span class="ActionScriptString">&apos;cartView&apos;</span><span class="MXMLDefault_Text">&quot;</span><span class="MXMLComponent_Tag">/&gt;</span>
            
        <span class="MXMLComponent_Tag">&lt;/mx:VBox&gt;</span>
    <span class="MXMLComponent_Tag">&lt;/mx:HBox&gt;</span>
<span class="MXMLComponent_Tag">&lt;/mx:Application&gt;</span></pre></body>
</html>
